package demoTest;

/**
 * 引用类型被赋值
 * 基本类型没有被赋值
 */
public  class test2 {
    String id =new String("d1");
    char[] name ={'d'};
//    String id ="d1";
//    char[] name ;
    public static void main(String[] args) {
        test2 s =new test2();
        s.say(s.id,s.name);
        System.out.println(s.id);
        System.out.println(s.name);
    }
    void say(String id ,char[] name ){
        id = "d2";
        name[0] = 's';
    }
}
